package com.oceansoft.core.jxkh.service.impl;

import com.oceansoft.core.common.util.Pagination;
import com.oceansoft.core.domain.SysUser;
import com.oceansoft.core.jxkh.dao.IPersonnelDao;
import com.oceansoft.core.jxkh.domain.Personnel;
import com.oceansoft.core.jxkh.service.IPersonnelService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

/**
 * Created by OS on 2017/12/5.
 */

@Service
public class PersonnelServiceImpl implements IPersonnelService {

    @Resource
    private IPersonnelDao personnelDao;

    @Override
    public Pagination findAllPersonnel(HashMap<String,String> map) {
        return personnelDao.findAllPersonnel(map);
    }

    @Override
    public void editPersonnelInfo(SysUser sysUser) {
         personnelDao.editPersonnelInfo(sysUser);
    }

    @Override
    public SysUser findPersonnelInfoByDbid(int dbid) {
        return personnelDao.findPersonnelInfoByDbid(dbid);
    }

    @Override
    public void deletePersonnelInfoByDbid(int dbid) {
        personnelDao.deletePersonnelInfoByDbid(dbid);
    }

    @Override
    public Pagination findPersonnelInfoByDeptId(HashMap<String,String> map) {
        return personnelDao.findPersonnelInfoByDeptId(map);
    }

    @Override
    public void editDeptManagerByDbidToYes(int dbid) {
        personnelDao.editDeptManagerByDbidToYes(dbid);
    }

    @Override
    public void editDeptManagerToNo(int deptId) {
        personnelDao.editDeptManagerToNo(deptId);
    }

    @Override
    public void editJoinCheck(int dbid,int i) {
        personnelDao.editJoinCheck(dbid,i);
    }

    @Override
    public void editActiveFlag(int dbid,int i) {
        personnelDao.editActiveFlag(dbid,i);
    }

    @Override
    public int findJoinCheck(int dbid) {
        return personnelDao.findJoinCheck(dbid);
    }

    @Override
    public int findActiveFlag(int dbid) {
        return personnelDao.findActiveFlag(dbid);
    }
}
